package org.netty.im.mapper;

import org.apache.ibatis.jdbc.SQL;


public class UserSqlTemplate {
	private static final String TABLE_NAME="app_log";
	
	public String insert() {  
		SQL sql = new SQL();
        sql.INSERT_INTO(TABLE_NAME);
        sql.VALUES("type", "#{log.type}");
        sql.VALUES("title", "#{log.title}");
        sql.VALUES("remote_addr", "#{log.remoteAddr}");
        sql.VALUES("request_uri", "#{log.requestUri}");
        sql.VALUES("method", "#{log.method}");
        sql.VALUES("params", "#{log.params}");
        sql.VALUES("result", "#{log.result}");
        sql.VALUES("user_agent", "#{log.userAgent}");
        sql.VALUES("exception", "#{log.exception}");
        sql.VALUES("consume", "#{log.consume}");
        sql.VALUES("start_time", "#{log.startTime}");
        sql.VALUES("end_time", "#{log.endTime}");
        
        return sql.toString();  
    }  
	
}
